<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "config".
 *
 * @property string $key
 * @property string $value
 * @property string $create_at
 * @property string $update_at
 */
class Config extends \app\models\BaseModel {
    /**
     * @inheritdoc
     */
    public static function tableName() {
        return 'config';
    }

    /**
     * @inheritdoc
     */
    public function rules() {
        return [
            [['key', 'value'], 'required'],
            [['value'], 'string'],
            [['create_at', 'update_at'], 'safe'],
            [['key'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels() {
        return [
            'key' => 'Key',
            'value' => 'Value',
            'create_at' => 'Create At',
            'update_at' => 'Update At',
        ];
    }

    public function fields() {
        $fields = [
        ];
        $fields = array_combine($fields, $fields);

        return $fields;
    }

    public function extraFields() {
        $fields = [
            'key',
            'value',
            'create_at',
            'update_at',
        ];
        $fields = array_combine($fields, $fields);
        return $fields;
    }
}
